﻿using LanguagePolish.EntityModel;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace LanguagePolish
{
    /// <summary>
    /// Логика взаимодействия для MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            CultureInfo cultureInfo = new CultureInfo("en-US");
            Thread.CurrentThread.CurrentCulture = cultureInfo;
            AddLevels();
            InitializeComponent();
        }

        private void AddLevels() // костыль для добавления уровней
        {
            if (LinksProvider.Model.EntityContext.Levels.ToList().Count == 0) 
            {
                Level l1 = new Level();
                l1.LevelName = "A1";
                LinksProvider.Model.EntityContext.Levels.Add(l1);

                Level l2 = new Level();
                l1.LevelName = "A2";
                LinksProvider.Model.EntityContext.Levels.Add(l2);

                Level l3 = new Level();
                l1.LevelName = "B1";
                LinksProvider.Model.EntityContext.Levels.Add(l3);

                Level l4 = new Level();
                l1.LevelName = "B2";
                LinksProvider.Model.EntityContext.Levels.Add(l4);

                Level l5 = new Level();
                l1.LevelName = "C1";
                LinksProvider.Model.EntityContext.Levels.Add(l5);

                Level l6 = new Level();
                l1.LevelName = "C2";
                LinksProvider.Model.EntityContext.Levels.Add(l6);
            }
        }
    }
}
